/*****************************************************************************
 *   Copyright 2005 Tim A Wang
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 *
 ****************************************************************************/
package com.jb.web.bean;

import com.jb.web.context.WebContext;


public class InternalFrame extends HtmlItem {
    static final long serialVersionUID = 123123L;

    static {
        publish(com.jb.web.bean.InternalFrame.class, STYLE, "scrolling");
        publish(com.jb.web.bean.InternalFrame.class, STYLE, "height");
        publish(com.jb.web.bean.InternalFrame.class, GENERAL, "src");
    }

    protected String mHeight;
    String mSrc;
    boolean mScrolling;

    public void setDefault(WebContext pContext) {
        this.setWidth("100%");
        this.setHeight("200");
        this.setBorderStyle(
            "background-color:#DDDDDD;border-top-style:solid;border-left-style:solid;border-right-style:solid;border-bottom-style:solid;border-top-width:1px;border-left-width:1px;border-right-width:1px;border-bottom-width:1px;border-top-color:#FFFFFF;border-left-color:#FFFFFF;border-right-color:#333333;border-bottom-color:#333333;");
    }

    public void setHeight(String mHeight) {
        this.mHeight = mHeight;
    }

    public String getHeight() {
        return mHeight;
    }

    public void setScrolling(boolean mScrolling) {
        this.mScrolling = mScrolling;
    }

    public boolean isScrolling() {
        return mScrolling;
    }

    public void setSrc(String mSrc) {
        this.mSrc = mSrc;
    }

    public String getSrc() {
        return mSrc;
    }

    public String getStyle(WebContext pCtx) {
        return super.getStyle(pCtx) + "height:" + mHeight + ";";
    }

    protected boolean isRef() {
        return false;
    }
}
